/**
 * @Author:周邱艳
 * @Date:2020/6/30
 * @Description:这是首页
 */
import React,{Component} from "react";

import HomeCarousel from "./Home_Component/HomeCarousel";
import HomeGrid from "./Home_Component/HomeGrid";
import HotNews from "./Home_Component/HotNews";
import {Badge, Card, Grid, List, WhiteSpace} from "antd-mobile";
import TopBest from "./Home_Component/TopBest";
import icon1 from "../../access/images/recommand.png";
import icon3 from "../../access/images/ranking.png";
import icon2 from "../../access/images/bestchoice.png";
import Announcement from "./Home_Component/Announcement";
import {Link} from "react-router-dom";


export default class Home extends Component{
    constructor(props) {
        super(props);
        this.state={
            disabled: false,
            list:[],//json表名
            isShow:false
        }}

    render() {
        return (
            <div>
                {/*走马灯*/}
                <HomeCarousel/>
                {/*宫格*/}
                <HomeGrid history={this.props.history}/>
                <WhiteSpace/>
                {/*平台公告*/}
                <HotNews/>
                {/*排行前三组合*/}
                <WhiteSpace/>
                <div>
                    <Card>
                        <Card.Header
                            title="组合爆款"
                            extra={
                                <span onClick={()=>{this.props.history.push({
                                    pathname:"/rankProducts"
                                })}} style={{color:"grey"}}>查看详情
                                    {/*<Link to={"/combineDealRule"} style={{color:"blue"}}> 查看详情</Link>*/}
                           </span>}
                        />
                        <Card.Body style={{height:"130px"}}>
                            <div style={{width:"31%",height:"100%",float:"left",boxShadow:"5px 5px 5px rgba(0,0,0,.5)"}}>
                                <p style={{textAlign:"center",marginTop:"1rem",fontSize:"1.8rem",fontWeight:"5rem"}}>三湘活息</p>
                                <h2 style={{textAlign:"center",marginTop:"0.3rem",color:"red"}}>3.100%</h2>
                                <p style={{textAlign:"center",marginTop:"0.2rem",fontSize:"1.4rem",fontWeight:"5rem",color:"grey"}}>提前支取收益率</p>

                            </div>
                            <div style={{width:"31%",height:"100%",float:"left",marginLeft:"1rem",boxShadow:"5px 5px 5px rgba(0,0,0,.5)"}}>
                                <p style={{textAlign:"center",marginTop:"1rem",fontSize:"1.8rem",fontWeight:"5rem"}}>定期5年</p>
                                <h2 style={{textAlign:"center",marginTop:"0.3rem",color:"red"}}>4.000%</h2>
                                <p style={{textAlign:"center",marginTop:"0.2rem",fontSize:"1.4rem",fontWeight:"5rem",color:"grey"}}>储蓄存款收益率</p>

                            </div>
                            <div style={{width:"31%",height:"100%",float:"left",marginLeft:"1rem",boxShadow:"5px 5px 5px rgba(0,0,0,.5)"}}>
                                <p style={{textAlign:"center",marginTop:"1rem",fontSize:"1.8rem",fontWeight:"5rem"}}>定期5年</p>
                                <h2 style={{textAlign:"center",marginTop:"0.3rem",color:"red"}}>4.875%</h2>
                                <p style={{textAlign:"center",marginTop:"0.2rem",fontSize:"1.4rem",fontWeight:"5rem",color:"grey"}}>储蓄存款收益率</p>

                            </div>
                        </Card.Body>

                    </Card>
                </div>
                {/*热点新闻*/}
                <WhiteSpace/>
                <div >
                    <Card>
                        <Card.Header
                            title="热点新闻"
                        />
                        <Card.Body style={{height:"80px"}}>
                            <div>
                                <Link to={{pathname:"/newsDetail"}}>
                                <List.Item  arrow="horizontal">
                                    <Badge text={0} style={{ marginLeft: 12 }}>为什么银行理财产品开始赔钱了？</Badge>
                                    <Badge text={'爆'} style={{ marginLeft: 12 }} />
                                </List.Item>
                                </Link>
                                <List.Item  arrow="horizontal">
                                    <Badge text={0} style={{ marginLeft: 12 }}>大学生狂买组合的原因</Badge>
                                    <Badge text={'热'} style={{ marginLeft: 12 }} />
                                </List.Item>
                                <List.Item  arrow="horizontal">
                                    <Badge text={0} style={{ marginLeft: 12 }}>今年夏天买买买组合</Badge>
                                    <Badge text={'炸'} style={{ marginLeft: 12 }} />
                                </List.Item>
                            </div>
                        </Card.Body>

                    </Card>



                </div>
                <WhiteSpace/>
                <WhiteSpace/>
                <WhiteSpace/>
                <WhiteSpace/>
                <WhiteSpace/>
                <WhiteSpace/>




            </div>
        );
    }
}

